package cn.crecheng.controller;

import com.crecheng.web.context.ParameterHolder;
import com.crecheng.web.support.Controller;
import com.crecheng.web.support.RequestMapping;

import javax.net.ssl.HttpsURLConnection;
import javax.servlet.http.HttpSession;

@Controller(path = "/student")
public class StudentController {//控制器类

    @RequestMapping(path = "/sign/in")
    public String signIn(ParameterHolder holder, HttpSession session){//控制器方法
        String un=holder.getString("username");
        String ps=holder.getString("ps");
        System.out.println("StudentController-in");
        System.out.println(un+" : "+ps);
        session.setAttribute("un",un);
        return "/WEB-INF/success.html";
    }

    @RequestMapping(path = "/sign/out")
    public String SignOut(){
        System.out.println("StudentController-out");
        return "out";
    }

}
